{% extends 'base.html' %} {% load crispy_forms_tags %} {% block title %}Appointment Details{% endblock %} {% block content %}

Appointment Details

Service:
{{ appointment.service.name }}
Date & Time:
{{ appointment.start_time|date:"F j, Y" }} at {{ appointment.start_time|time:"g:i A" }}
Duration:
{{ appointment.service.duration|time:"H:i" }} hours
{% if appointment.staff_member %}
Staff Member:
{{ appointment.staff_member.user.get_full_name|default:appointment.staff_member.user.username }}
{% endif %}
Status:
{{ appointment.get_status_display }}
{% if appointment.notes %}
Notes:
{{ appointment.notes|linebreaks }}
{% endif %}
{% if request.user == appointment.client or request.user.is_staff %} Edit Appointment Cancel Appointment {% endif %} Back to List
{% if request.user.is_staff %}
Add Note
{% csrf_token %} {{ note_form|crispy }}
{% endif %} {% if appointment.notes_history.all %}
Notes History
{% for note in appointment.notes_history.all %}
{{ note.author.get_full_name|default:note.author.username }}
{{ note.created_at|date:"M j, Y H:i" }}

{{ note.note }}

{% if request.user == note.author or request.user.is_staff %} {% endif %}
{% endfor %}
{% endif %}
{% endblock %} {% block extra_js %} {% endblock %}